<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name=viewport content="with=device-width,initial-scale=1.0">
<link href="../resource/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="../resource/css/basic.css" rel="stylesheet">
<script src="../resource/js/jquery.min.js"></script>
<script src="../resource/bootstrap/js/bootstrap.min.js"></script>
<script src="../resource/js/user.js"></script>
<script src="../resource/js/testexam.js"></script>
<script>
	$(function() {
		$('#btnLogout').click(logout);
		$('#putBtn').click(postAnswer);
	});
</script>
<title>考试</title>
</head>
<body onload="settimes()">
	<nav class="navbar navbar-fixed-top navbar-primary" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<a href="../"><img class="img-responsive"
					src="../resource/image/header3.png" /></a>
			</div>
			<ul class="user nav navbar-nav navbar-right">
				<c:choose>
					<c:when test="${user != null }">
						<li><a href="#"><i class="glyphicon glyphicon-comment"></i>
								我 的 消 息</a></li>
						<li><a href="#"
							class="dropdown-toggle gropdown-block gropdown-primary"
							data-toggle="dropdown"> <img style="height: 18px"
								src="${user.logo }" /> ${user.petName} <span class="caret"></span>
						</a>
							<div class="dropdown-menu" role="menu">
								<div class="row">
									<div class="col-xs-6">
										<dl class="col-xs-offset-2">
											<dd>
												<img class="img-circle img-responsive" src="${user.logo }" />
											</dd>
											<dt class="text-center">
												<a class="list-default" target="view_window"
													href="userCenter"> ${user.petName }</a>
											</dt>
										</dl>
									</div>

									<div class="col-xs-6">
										<ul class="list-unstyled">
											<li class="list-block"><a target="view_window"
												href="../userCenter"><i class="glyphicon glyphicon-home"></i>
													个 人 中 心</a></li>
											<li class="list-block"><a href="#"><i
													class="glyphicon glyphicon-comment"></i> 我 的 消 息</a></li>
											<li class="list-block"><a target="view_window"
												href="../userInfo"><i class="glyphicon glyphicon-user"></i>
													信 息 编 辑 </a></li>
											<li class="list-block"><a target="view_window"
												href="../userLesson"><i class="glyphicon glyphicon-book"></i>
													课 程 管 理</a></li>
											<li class="list-block"><a target="view_window"
												href="../userExamResults"><i
													class="glyphicon glyphicon-pencil"></i> 成 绩 查 询</a></li>
											<li class="list-block"><a id="btnLogout" href="#"><i
													class="glyphicon glyphicon-off"></i> 退 出 登 录</a></li>
										</ul>
									</div>
								</div>
								<div role="row"></div>
							</div></li>
					</c:when>
					<c:otherwise>
						<li><a href="../login"><i
								class="glyphicon glyphicon-user"></i> 登 陆</a></li>
						<li><a href="../regist"><i
								class="glyphicon glyphicon-cog"></i> 注 册</a></li>
					</c:otherwise>
				</c:choose>
			</ul>
		</div>
	</nav>
	<div>
		<ol class="breadcrumb">
			<li><a href="../"><i class="glyphicon glyphicon-home"></i>
					首页</a></li>
			<li><a href="../lessonTest"><i
					class="glyphicon glyphicon-book"></i> 在线测试</a></li>
			<li class="active"><i class="glyphicon glyphicon-wrench"></i>
				${exam.title}</li>
		</ol>
	</div>
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-8 col-md-offset-2">
			<h1>${exam.title}</h1>
			<table id="examList"
				class="table table-striped table-bordered table-hover">
				<c:forEach items="${examDictinoaries}" var="examdic" varStatus="lens">
					<tr>
						<td>
							<dl>
								<dt>${lens.count}.${examdic.name }</dt>
								<c:forEach items="${examdic.examDicResult}" var="examResult" varStatus="var">
									<dd><input type="radio" name="${examdic.id}" id="${examResult.id}" value="${examResult.id}"/>${map[var.index]}.${examResult.name }</dd>
								</c:forEach>
							</dl>
						</td>
					</tr>
				</c:forEach>
			</table>
			</div>
		</div>
	</div>
	<footer class="footer navbar-fixed-bottom " style="background-color: #D9EDF7">
	    <div class="container-fluid">
	    	<div class="row">
	    		<div class="col-md-4 col-md-offset-5">
	    			<span id="ltime">${exam.time }</span>
	    		</div>
	    		<div class="col-md-3 ">
	    			<a class="btn btn-default" href="javascript:void(0)" role="button" id="putBtn">交卷</a>
	    		</div>
	    	</div>
	    </div>
	</footer>
</body>
</html>